package com.wanxi.method;

public class PrintNTimes {
    public static void main(String[] args) {
        boolean b = printNTimes(4);
        System.out.println(b);
    }

    public static boolean printNTimes(int times) {
        for (int i = 0; i < times; i++) {
            System.out.println(i + 1 + "次 HelloWorld");
            if (i == 3) {
                return false;
            }
        }
        return true;
    }
}
